<template>
	<view class="u-padding-20">
		<view class="list_con u-flex u-row-between">
			<text class="title_con">采购详情</text>
			<text v-if="detail.status==0" class="status_con">待审核</text>
			<text v-else-if="detail.status==1" class="status_con">审核通过</text>
			<text v-else class="status_con">审核拒接</text>
		</view>
		<view class="list_con u-flex u-row-between">
			<text>采购物品</text>
			<text>{{detail.name}}</text>
		</view>
		<view class="list_con u-flex u-row-between">
			<text>采购数量</text>
			<text>{{detail.num}}</text>
		</view>
		<!-- <view class="list_con u-flex u-row-between">
			<text>所属部门</text>
			<text>客服部</text>
		</view> -->
		<view class="list_con u-flex u-row-between">
			<text>采购时间</text>
			<text>{{detail.time}}</text>
		</view>
		<!-- <view class="list_con u-flex u-row-between">
			<text>使用部门</text>
			<text>物业部</text>
		</view> -->
		<!-- <view class="list_con u-flex u-row-between">
			<text>使用负责人</text>
			<text>牟某某</text>
		</view>
		<view class="list_con u-flex u-row-between">
			<text>管理员</text>
			<text>木木</text>
		</view> -->
		<view class="list_con">
			<text>物品用途</text>
			<view style="color:#666;">{{detail.label}}</view>
		</view>
		<view class="list_con">
			<text>提交时间</text>
			<view style="color:#666;">{{$u.timeFormat(detail.create_time, 'yyyy-mm-dd')}}</view>
		</view>
		<view class="list_con u-flex u-row-between">
			<text class="title_con">物品信息</text>
			<text class="status_con"></text>
		</view>
		<view class="list_con" style="border:none">
			<image :src="detail.image" mode="aspectFill"></image>
			<view class="dis_inl_blo">
				<view>{{detail.name}}</view>
				<text style="color:#666;margin:10rpx 0;display: block;">数量：{{detail.num}} 单价：{{detail.unit}}</text>
				<text class="dis_blo title_con">总价：￥{{detail.price}}</text>
			</view>
		</view>
		<!-- <button class="u-margin-bottom-80 btn_con" @click="completeRepair">标记完成</button> -->
	</view>
</template>

<script>
	export default {
		data () {
			return {
				detail:{}
			}
		},
		onLoad(options) {
			let item=JSON.parse(decodeURIComponent(options.item));
			this.detail.id=item.id;
			this.detail.name=item.name;
			this.detail.num=item.num;
			this.detail.unit=item.unit;
			this.detail.price=item.price;
			this.detail.label=item.label;
			this.detail.time=item.time;
			this.detail.image=item.image;
			this.detail.create_time=item.create_time;
			this.detail.nid=item.nid;
			this.detail.status=item.status
			console.log(this.detail)
		}
	}
</script>

<style lang="scss">
	.list_con{
		padding:20rpx 0;
		border-bottom:1rpx solid #ddd;
	}
	.list_con text:first-child{
		color:#666;
	}
	.list_con .title_con{
		color:#333 !important;
		font-size: 32rpx;
		font-weight: bold;
	}
	.status_con{
		font-size: 28rpx;
		color:#008987;
	}
	.list_con image{
		width:150rpx;
		height:150rpx;
		margin:0 20rpx;
		border-radius: 20rpx;
	}
	.btn_con{
		height:70rpx;
		line-height: 70rpx;
		font-size: 30rpx;
		border-radius: 35rpx;
		background-image: url('https://resourse.cnlhjt.com/upload/20220825/d1aa35c1d129137d9b12c8f34e59c5bc.png');
		background-size: 100% 70rpx;
		color:#fff;
		margin-top:50rpx;
	}
</style>
